<?php
session_start();
global $title;
require_once('db.php');
$title = msg('Search Results');

if (empty($_GET['page'])) $_GET['page'] = 0;
if (empty($_GET['name'])) $_GET['name'] = '';
if (empty($_GET['city'])) $_GET['city'] = '';

if (empty($_REQUEST['name']) && empty($_REQUEST['city'])) list($count, $results) = all_people();
else list($count, $results) = search_person($_REQUEST);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include('header.php') ?>
	<?php include_once("sidebar.php"); ?>
	<div id="content" style="margin-left:20px;">
	
	<?php 
	    $vols = get_volunteers();
	    
	    
	    
	    print '<h3>' . sizeof($vols) . ' Volunteers Registered</h3>';
	    
	     print "<table border=1 ><tr>" . "<td>name</td>"  . "<td>email</td>" . "<td>phone</td>" . "<td>skype</td>"  . "<td>twitter</td>"  . "<td>org</td>"  . "<td>location</td>"  . "<td>kreyol</td>"  . "<td>english</td>"  . "<td>french</td>"  . "<td>previous_work</td>"  . "<td>new_work</td>" . "</tr>";
	    
	    foreach($vols as $key=>$row){
	   
	  print "<tr>"  . "<td>" . $row['name'] . "</td>"  . "<td>" . $row['email'] . "</td>"  ."<td>" . $row['phone'] . "</td>"  . "<td>" . $row['skype'] . "</td>"  . "<td>" . $row['twitter'] . "</td>"  . "<td>" . $row['org'] . "</td>"  . "<td>" . $row['location'] . "</td>"  . "<td>" . $row['kreoyl'] . "</td>"  . "<td>" . $row['english'] . "</td>"  . "<td>" . $row['french'] . "</td>"  . "<td>" . $row['previous_work'] . "</td>"  . "<td>" . $row['new_work'] . "</td>"  . "</tr>";
	   
	    ?>
	   
	   
	   
	   
	    
	    <?php } ?>
	
	</table>
	
	</div>
</div>
<?php require_once('footer.php'); ?>
</body>
</html>
